# Filters added to this controller apply to all controllers in the application.
# Likewise, all the methods added will be available for all controllers.

class ApplicationController < ActionController::Base
  helper :all # include all helpers, all the time

  # See ActionController::RequestForgeryProtection for details
  # Uncomment the :secret if you're not using the cookie session store
  protect_from_forgery # :secret => '4beed8ecbcfff9dac46e92665e3976fa'

	#include AuthenticatedSystem
  #before_filter :login_from_cookie

	private

	def authorize
		unless User.find_by_id(session[:user_id])
		flash[:notice] = "Please log in"
		redirect_to(:controller => "login", :action => "login")
		end
	end

end
